<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
    </script>
</head>
<body>
<dl>
    {volist name="data" id= "v"}
    {if condition="$v.fid == 0"}
    <dt class="{$v.pid}">{$v.pname}</dt>
    {else /}
    <dd class="{$v.fid}"><a href="{$v.action}">{$v.pname}</a></dd>
    {/if}
    {/volist}
</dl>
<a href="/out">退出登录</a>
</body>
</html>
<script>
    $("dt").on('click',function () {
        var id = $(this).prop('class');
        $("dd[class="+id+"]").slideToggle("slow");
    })
</script>
